
package at.fhj.itm.metadata.impl;

import at.fhj.itm.metadata.Index;
import at.fhj.itm.metadata.MetadataItem;

import java.util.Collections;
import java.util.List;

/**
 *
 * @author Seuchter
 */
public abstract class AbstractIndex extends AbstractMetadataItem  implements Index {


    private boolean  isUnqiue;
    private boolean isPrimaryKey;
    
    public AbstractIndex(String name, boolean isPrimary, boolean isUnique)
    {
        super(name);
        this.isUnqiue = isUnique;
        this.isPrimaryKey = isPrimary;

    }




    public boolean isUnique()
    {
        return isUnqiue;
    }

    public List<? extends MetadataItem> getChildren()
    {
        return Collections.emptyList();
    }

    public String getName()
    {
        return name;
    }

    public boolean isPrimaryKey()
    {
        return isPrimaryKey;
    }



}
